package  
{
	import Audio.SoundManager;
	import com.greensock.easing.Bounce;
	import flash.net.URLLoader;
	import flash.net.URLRequest;
	import flash.net.URLVariables;
	import flash.net.URLLoaderDataFormat;
	import flash.net.URLRequestMethod;
	import flash.events.Event;
	import flash.external.ExternalInterface;
	/**
	 * ...
	 * @author ...Vượng
	 */
	public class database 
	{
		private static var _instance:database;
		public var URLGETSET:String;
		public var URLGETHUONGTEST:String;
		
		public var URLSOLIDERSET : String;
		public var URLSOLIDERSETARMOR : String;
		public var URLSOLIDERSETRESPAWN : String;
		public var URLSOLIDERSETMOREHP : String;
		public var URLARCHERPERCENTSELL : String;
		public var URLARCHERRange : String;
		public var URLARCHERDESO : String;
		public var URLARCHERMORERANGE : String;
		public var URLARCHERDOUBLE : String;
		public var URLCANONDAM : String;
		public var URLCANONCOIN : String;
		public var URLCANONRANGE : String;
		public var URLSTAGESET : String;
		public var URLSTARSTAGE1SET : String;
		public var URLSTARSTAGE2SET : String;
		
		public var URLSETLEVELUPDATESTAR : String;
		public var URLRESETSTAR : String;
		public var URLSOLIDERSETRESRANGE: String;
		
		public var RESULD:String;
		public var RESULDARRAYHUONGTEST:Array;
		public var RESULDTOWERARRAY:Array;
		public var RESULTSOLIDERARRAY : Array;
		public var RESULTCANONARRAY : Array;
		public var RESULTLEVELUPDATESTAR:Array;
		
		public var RESULTSTAGE:Array;
		public var RESULTSTARSTAGE1:Array;
		public var RESULTSTARSTAGE2:Array;
		
		private var userName:String;
		public var m_curStage:int;
		public var m_curQuestion:int;
		public var m_curLevel:int;
		public var m_testGuid:Boolean;
		public var m_testTouch:Boolean;
		public var m_url:String;
		public var m_user:String;
		public var m_testGetUser:Boolean;
		public var m_Sound:SoundManager=new SoundManager();
		public var m_Music:SoundManager = new SoundManager();
		public var m_testPlayMusic:Boolean=true;
		public var m_testPlaySound:Boolean = true;
		public var m_code:String;
		
		public function database() 
		{
			URLGETSET="http://localhost/GET_SET.php";
			URLGETHUONGTEST = "http://localhost/getHuongTest.php";
			URLRESETSTAR = "http://localhost/ResetStar.php";			
		}
		static public function get instance():database 
		{
			if (_instance == null)
			{
				_instance = new database();
			}
			return _instance;
		}
		
		public function get UserName():String 
		{
			return userName;
		}
		
		public function set UserName(value:String):void 
		{
			userName = value;
		}
		//////////////CREATE RESET/////////////////////////////////////////////////////////////////////////////////////////////////////////////
		//**************************************************CREATE NEW****************************************************//
		public function CreateNew():void
		{
			var loader :URLLoader = new URLLoader;
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			var urlvars: URLVariables = new URLVariables;
			urlreq.method = URLRequestMethod.POST;
			urlvars.ID = "CREATE_NEW";
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.load(urlreq);
		}
		//**************************************************RESET****************************************************//
		public function setResetStar() : void
		{
			var urlreq:URLRequest = new URLRequest(URLRESETSTAR);
			urlreq.method = URLRequestMethod.POST;
			var loader : URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			
			urlreq.data = urlvars;
			loader.load (urlreq);
		}		
		//////////////GET DATA/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		//**************************************************TOWER ****************************************************//
		public function getDataTower():void
		{
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			urlreq.method = URLRequestMethod.POST;
			var loader :URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlvars.ID = "GET_TOWER";
			urlreq.data = urlvars;
			urlvars.User = UserName;
			loader.addEventListener(Event.COMPLETE, dataTowerOnLoad);
			loader.load(urlreq);
		}
		private function dataTowerOnLoad(e:Event):void 
		{
			RESULDTOWERARRAY = new Array();
			RESULD =  e.target.data;
			//RESULD = RESULD.substring(0, RESULD.indexOf("\r"));
			RESULD = RESULD.substring(0, RESULD.lastIndexOf("\n"));
			while (RESULD.indexOf("\n") != -1)
			{
				var index:int = RESULD.indexOf("\n");
				RESULDTOWERARRAY.push(RESULD.substr(0, index));
				RESULD = RESULD.substring(index+1, RESULD.length);
			}
			RESULDTOWERARRAY.push(RESULD);
		}
		
		  //**************************************************BARTRACK ****************************************************//
		public function getDataSolider():void
		{
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			urlreq.method = URLRequestMethod.POST;
			var loader :URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlvars.ID = "GET_BATRACK";
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.addEventListener(Event.COMPLETE, dataSoliderOnLoad);
			loader.load(urlreq);
		}
		private function dataSoliderOnLoad(e:Event):void 
		{
			RESULTSOLIDERARRAY = new Array();
			RESULD =  e.target.data;
			//RESULD = RESULD.substring(0, RESULD.indexOf("\r"));
			RESULD = RESULD.substring(0, RESULD.lastIndexOf("\n"));
			while (RESULD.indexOf("\n") != -1)
			{
				var index:int = RESULD.indexOf("\n");
				RESULTSOLIDERARRAY.push(RESULD.substr(0, index));
				RESULD = RESULD.substring(index+1, RESULD.length);
			}
			RESULTSOLIDERARRAY.push(RESULD);
		}
		
		//**************************************************CANON ****************************************************//
		public function getDataCanon() : void
		{
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			urlreq.method = URLRequestMethod.POST;
			var loader :URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlvars.ID = "GET_CANON";
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.addEventListener(Event.COMPLETE, dataCanonOnLoad);
			loader.load(urlreq);
		}
		private function dataCanonOnLoad(e:Event):void 
		{
			RESULTCANONARRAY = new Array();
			RESULD =  e.target.data;
			//RESULD = RESULD.substring(0, RESULD.indexOf("\r"));
			RESULD = RESULD.substring(0, RESULD.lastIndexOf("\n"));
			while (RESULD.indexOf("\n") != -1)
			{
				var index:int = RESULD.indexOf("\n");
				RESULTCANONARRAY.push(RESULD.substr(0, index));
				RESULD = RESULD.substring(index+1, RESULD.length);
			}
			RESULTCANONARRAY.push(RESULD);
		}
		
		//**************************************************UPDATE STAR ****************************************************//
		public function getDataLevelUpdateStar():void
		{
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			urlreq.method = URLRequestMethod.POST;
			var loader :URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlvars.ID = "GET_UPDATESTAR";
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.addEventListener(Event.COMPLETE, dataOnLoadLevelUpdateStar);
			loader.load(urlreq);
		}
		private function dataOnLoadLevelUpdateStar(e:Event):void 
		{
			RESULTLEVELUPDATESTAR = new Array();
			RESULD =  e.target.data;
			//RESULD = RESULD.substring(0, RESULD.indexOf("\r"));
			RESULD = RESULD.substring(0, RESULD.lastIndexOf("\n"));
			while (RESULD.indexOf("\n") != -1)
			{
				var index:int = RESULD.indexOf("\n");
				RESULTLEVELUPDATESTAR.push(RESULD.substr(0, index));
				RESULD = RESULD.substring(index+1, RESULD.length);
			}
			RESULTLEVELUPDATESTAR.push(RESULD);
		}
		
		//**************************************************STAGE ****************************************************//
		public function getStage() : void
		{
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			urlreq.method = URLRequestMethod.POST;
			var loader :URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlvars.ID = "GET_STAGE";
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.addEventListener(Event.COMPLETE, dataOnLoadStage);
			loader.load(urlreq);
		}
		private function dataOnLoadStage(e:Event):void 
		{
			RESULTSTAGE = new Array();
			RESULD =  e.target.data;
			//RESULD = RESULD.substring(0, RESULD.indexOf("\r"));
			RESULD = RESULD.substring(0, RESULD.lastIndexOf("\n"));
			while (RESULD.indexOf("\n") != -1)
			{
				var index:int = RESULD.indexOf("\n");
				RESULTSTAGE.push(RESULD.substr(0, index));
				RESULD = RESULD.substring(index+1, RESULD.length);
			}
			RESULTSTAGE.push(RESULD);
		}
		
		//**************************************************STARSTAGE1 ****************************************************//
		public function getStarStage1() : void
		{
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			urlreq.method = URLRequestMethod.POST;
			var loader :URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlvars.ID = "GET_STARSTAGE1";
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.addEventListener(Event.COMPLETE, dataOnLoadStarStage1);
			loader.load(urlreq);
		}
		private function dataOnLoadStarStage1(e:Event):void 
		{
			RESULTSTARSTAGE1 = new Array();
			RESULD =  e.target.data;
			//RESULD = RESULD.substring(0, RESULD.indexOf("\r"));
			RESULD = RESULD.substring(0, RESULD.lastIndexOf("\n"));
			while (RESULD.indexOf("\n") != -1)
			{
				var index:int = RESULD.indexOf("\n");
				RESULTSTARSTAGE1.push(RESULD.substr(0, index));
				RESULD = RESULD.substring(index+1, RESULD.length);
			}
			RESULTSTARSTAGE1.push(RESULD);
		}
		
		//**************************************************STARSTAGE2 ****************************************************//
		public function getStarStage2() : void
		{
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			urlreq.method = URLRequestMethod.POST;
			var loader :URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlvars.ID = "GET_STARSTAGE2";
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.addEventListener(Event.COMPLETE, dataOnLoadStarStage2);
			loader.load(urlreq);
		}
		private function dataOnLoadStarStage2(e:Event):void 
		{
			RESULTSTARSTAGE2 = new Array();
			RESULD =  e.target.data;
			//RESULD = RESULD.substring(0, RESULD.indexOf("\r"));
			RESULD = RESULD.substring(0, RESULD.lastIndexOf("\n"));
			while (RESULD.indexOf("\n") != -1)
			{
				var index:int = RESULD.indexOf("\n");
				RESULTSTARSTAGE2.push(RESULD.substr(0, index));
				RESULD = RESULD.substring(index+1, RESULD.length);
			}
			RESULTSTARSTAGE2.push(RESULD);
		}
		
		//////////////SET DATA/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		
		//**************************************************BATRACK ****************************************************//
		public function setDataBartrack() : void
		{
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			urlreq.method = URLRequestMethod.POST;
			var loader : URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlvars.ID = "SET_SOLIDER";
			urlvars.setHp = 55;
		    urlvars.setHp1 = 110;
			urlvars.setHp2 = 165;
			urlvars.User = UserName;

			urlreq.data =  urlvars;
			loader.load (urlreq);	
		}
		public function setDataBartrackArmor() : void
		{
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			urlreq.method = URLRequestMethod.POST;
			var loader : URLLoader = new URLLoader;
			var urlvars : URLVariables = new URLVariables;
			urlvars.ID = "SET_SOLIDER_ARMOR";
			urlvars.setArmor = 1;
			urlvars.setArmor2 =  2;
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.load (urlreq);
		}
		public function setDataBartrackRespawn() : void
		{
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			urlreq.method = URLRequestMethod.POST;
			var loader : URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlvars.ID = "SET_SOLIDER_ESPAWN";
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.load (urlreq);
		}
		public function setDataBartrackResRange() : void
		{
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			urlreq.method = URLRequestMethod.POST;
			var loader : URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlvars.ID = "SET_SOLIDER_RESRANGE";
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.load (urlreq);
		}
		public function setDataBartrackMoreHp() : void
		{
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			urlreq.method = URLRequestMethod.POST;
			var loader : URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlvars.ID = "SET_SOLIDER_MOREHP";
			urlvars.setHp = 60;
		    urlvars.setHp1 = 120;
			urlvars.setHp2 = 180;
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.load (urlreq);
		}
		
		//**************************************************ARCHER ****************************************************//
		////////////SET ARCHER
		public function setDataArcherPercentSell () : void
		{
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			urlreq.method = URLRequestMethod.POST;
			var loader : URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlvars.ID = "SET_ARCHER_PERCENTSELL";
			urlvars.setPercentSell = 1;
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.load (urlreq);
		}
		
		public function setDataArcherRange() : void
		{
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			urlreq.method = URLRequestMethod.POST;
			var loader : URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlvars.ID = "SET_ARCHER_RANGE";
			urlvars.setRange = 1.6;
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.load (urlreq);
		}
		public function setDataArcherDeso() : void
		{
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			urlreq.method = URLRequestMethod.POST;
			var loader : URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlvars.ID = "SET_ARCHER_DESO";
			urlvars.setDeso = 10;
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.load (urlreq);
		}
		public function setDataArcherMoreRange() : void
		{
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			urlreq.method = URLRequestMethod.POST;
			var loader : URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlvars.ID = "SET_ARCHER_MORERANGE";
			urlvars.setRange = 1.7;
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.load (urlreq);
		}
		public function setDataArcherDouble() : void
		{
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			urlreq.method = URLRequestMethod.POST;
			var loader : URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlvars.ID = "SET_ARCHER_DOUBLE";
			urlvars.setDouble = 20;
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.load (urlreq);
		}
		
		//**************************************************CANON ****************************************************//
		public function setDataCanonDam() : void
		{
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			urlreq.method = URLRequestMethod.POST;
			var loader : URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlvars.ID = "SET_CANON_DAM";
			urlvars.setMin = 9;
			urlvars.setMin1 = 17;
			urlvars.setMin2 = 33;
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.load (urlreq);
		}
		public function setDataCanonCoin() : void
		{
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			urlreq.method = URLRequestMethod.POST;
			var loader : URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlvars.ID = "SET_CANON_COIN";
			urlvars.setCoin = 90;
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.load (urlreq);
		}
		public function setDataCanonRange() : void
		{
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			urlreq.method = URLRequestMethod.POST;
			var loader : URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlvars.ID = "SET_CANON_RANGE";
			urlvars.setCoin = 1.6;
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.load (urlreq);
		}
		//**************************************************UPDATESTAR ****************************************************//
		public function setDataLevelUpdateStar(skill1:int,skill2:int,skill3:int,skill4:int,skill5:int,skill6:int,totalStar:int):void
		{
			var loader :URLLoader = new URLLoader;
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			var urlvars: URLVariables = new URLVariables;
			urlreq.method = URLRequestMethod.POST;
			urlvars.ID = "SET_UPDATE_STAR";
			urlvars.Skill1  = skill1;
			urlvars.Skill2 = skill2;
			urlvars.Skill3 = skill3;
			urlvars.Skill4 = skill4;
			urlvars.Skill5 = skill5;
			urlvars.Skill6 = skill6;
			urlvars.User = UserName;
			urlvars.TotalStar = totalStar;
			urlreq.data = urlvars;
			loader.load(urlreq);
		}
		
		public function setDataTotalStar(totalStar:int):void
		{
			var loader :URLLoader = new URLLoader;
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			var urlvars: URLVariables = new URLVariables;
			urlreq.method = URLRequestMethod.POST;
			urlvars.ID = "SET_TOTAL_STAR";
			urlvars.User = UserName;
			urlvars.TotalStar = totalStar;
			urlreq.data = urlvars;
			loader.load(urlreq);
		}
		
		//**************************************************STAGE ****************************************************//
		public function setStage(_Stage:int,_Question:int):void
		{
			var loader :URLLoader = new URLLoader;
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			var urlvars: URLVariables = new URLVariables;
			urlreq.method = URLRequestMethod.POST;
			urlvars.ID = "SET_STAGE";
			urlvars.User = UserName;
			urlvars.Stage = _Stage;
			urlvars.Question = _Question;
			urlreq.data = urlvars;
			loader.load(urlreq);
		}
		
		//**************************************************STAR STAGE1 ****************************************************//
		public function setStarStage1(MaxLevel:int,Level1:int,Level2:int,Level3:int,Level4:int,Level5:int,Level6:int,Level7:int,Level8:int,Level9:int,Level10:int,Level11:int,Level12:int):void
		{
			var loader :URLLoader = new URLLoader;
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			var urlvars: URLVariables = new URLVariables;
			urlreq.method = URLRequestMethod.POST;
			urlvars.ID = "SET_STAR_STAGE_1";
			urlvars.MaxLevel  = MaxLevel;
			urlvars.Level1  = Level1;
			urlvars.Level2 = Level2;
			urlvars.Level3 = Level3;
			urlvars.Level4 = Level4;
			urlvars.Level5 = Level5;
			urlvars.Level6 = Level6;
			urlvars.Level7 = Level7;
			urlvars.Level8 = Level8; 
			urlvars.Level9 = Level9;
			urlvars.Level10 = Level10;
			urlvars.Level11 = Level11;
			urlvars.Level12 = Level12;
			
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.load(urlreq);
		}
		
		//**************************************************STAR STAGE2 ****************************************************//
		public function setStarStage2(MaxLevel:int,Level1:int,Level2:int,Level3:int,Level4:int,Level5:int,Level6:int,Level7:int,Level8:int):void
		{
			var loader :URLLoader = new URLLoader;
			var urlreq:URLRequest = new URLRequest(URLGETSET);
			var urlvars: URLVariables = new URLVariables;
			urlreq.method = URLRequestMethod.POST;
			urlvars.ID = "SET_STAR_STAGE_2";
			urlvars.MaxLevel  = MaxLevel;
			urlvars.Level1  = Level1;
			urlvars.Level2 = Level2;
			urlvars.Level3 = Level3;
			urlvars.Level4 = Level4;
			urlvars.Level5 = Level5;
			urlvars.Level6 = Level6;
			urlvars.Level7 = Level7;
			urlvars.Level8 = Level8; 
			
			urlvars.User = UserName;
			urlreq.data = urlvars;
			loader.load(urlreq);
		}
		//////////////DATA OUTSIZE/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		//**************************************************HUONG TEST ****************************************************//
		public function getDataHuongTest():void
		{
			var urlreq:URLRequest = new URLRequest(URLGETHUONGTEST);
			urlreq.method = URLRequestMethod.POST;
			var loader :URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlreq.data = urlvars;
			loader.addEventListener(Event.COMPLETE, dataHuongTestOnLoad);
			loader.load(urlreq);
		}
		private function dataHuongTestOnLoad(e:Event):void 
		{
			RESULDARRAYHUONGTEST = new Array();
			RESULD =  e.target.data;
			RESULD = RESULD.substring(0, RESULD.lastIndexOf("\n"));
			while (RESULD.indexOf("\n") != -1)
			{
				var index:int = RESULD.indexOf("\n");
				RESULDARRAYHUONGTEST.push(RESULD.substr(0, index));
				RESULD = RESULD.substring(index+1, RESULD.length);
			}
			RESULDARRAYHUONGTEST.push(RESULD);
		}
		
		////***********TESTLOAD*********//
		public function TestLoad() : void
		{
			var urlreq:URLRequest = new URLRequest("http://localhost/GET_SET.php");
			urlreq.method = URLRequestMethod.POST;
			var loader :URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlreq.data = urlvars;
			loader.addEventListener(Event.COMPLETE, dataOnLoadTestLoad);
			loader.load(urlreq);
		}
		private function dataOnLoadTestLoad(e:Event):void 
		{
			RESULD =  e.target.data;
		}
		////***********USER *************//
		public function getUser() : void
		{
			var urlreq:URLRequest = new URLRequest("http://localhost/Search.php");
			urlreq.method = URLRequestMethod.POST;
			var loader :URLLoader = new URLLoader;
			var urlvars: URLVariables = new URLVariables;
			urlvars.User = database.instance.UserName;
			urlreq.data = urlvars;
			loader.addEventListener(Event.COMPLETE, dataOnLoadUser);
			loader.load(urlreq);
		}
		private function dataOnLoadUser(e:Event):void 
		{
			RESULD =  e.target.data;
			RESULD = RESULD.substring(0, RESULD.indexOf("\n")-1);
			m_user = RESULD;

			
			m_testGetUser = true;
		}
		//
	}

}